package com.infore.remoteControl.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.infore.remoteControl.entity.instructionsEntity.InstructionsData;
import com.infore.remoteControl.remoteService.IDataReceivingService;
import com.infore.remoteControl.service.InstructionsSendStrategyService;
/**
 * 实时发送策略
 * @author Cold
 *
 */
@Service
public class RealTimeSendStrategy implements InstructionsSendStrategyService {
	
	@Autowired
	IDataReceivingService iDataReceivingService;

	@Override
	public void send(InstructionsData instructionsData) {
		Runnable runnable = new Runnable() {
			
			@Override
			public void run() {
				System.out.println("实时发送策略线程");
				// 1.每种策略都需要新建一个线程，避免干扰主线程工作； 
				// 2.调用远程控制服务与数据接收服务-发送指令接口,接收返回消息；
			}
		};
		Thread thread = new Thread(runnable);
		thread.start();
	}

}
